-- GENERATED SPELL FOR [Kurzen Elite] --


function spell0_939(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_939', 534, 1)
end

function spell1_939(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_939', 575, 1)
end

function spell2_939(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_939', 2000, 1)
end

function Sorts_939(pUnit, Event)
local choix_sorts_939 = math.random(0, 2)
if choix_sorts_939 == 0 then
pUnit:RegisterEvent('spell0_939', 1, 1)
end
if choix_sorts_939 == 1 then
pUnit:RegisterEvent('spell1_939', 1, 1)
end
if choix_sorts_939 == 2 then
pUnit:RegisterEvent('spell2_939', 1, 1)
end
end

function mob939_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_939', math.random(1500, 3000), 1)
end

function mob939_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob939_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob939_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(939, 1, 'mob939_Action')
RegisterUnitEvent(939, 2, 'mob939_Leave')
RegisterUnitEvent(939, 3, 'mob939_Kill')
RegisterUnitEvent(939, 4, 'mob939_Die')
